$(function () {

    var html_data = {
        baseConfig: baseConfig,
        sessionid: '',
        sessionid_q: '',
        default_address: null,
        show_live_list: true,
        show_host_detail: false,
        show_host_info_obj: {},
        near_user_list: [],
        address_list: []

    };
    var app = new Vue({
        el: '#guan_zhu_html',
        data: html_data,
        methods: {
            show_host_info:function (obj) {
                html_data.show_host_detail = true;
                html_data.show_host_info_obj = obj;

                html_data.show_live_list = true;
                html_data.show_chat = false;
            },
            hide_host_info:function (obj) {
                html_data.show_host_detail = false;
                html_data.show_host_info_obj = obj;

                html_data.show_live_list = true;
                html_data.show_chat = false;
            },
            map_move_to: function (lat, lng) {
                client_storage('lat', lat);
                client_storage('lng', lng);
                client_storage('zoom', 15);
                client_storage("page", "tab_program");
                window.location.href="home.html";
            },
            go_goods_detail: function (goods) {
                var phone_dict = phone_type();
                var phone = 'android';
                if (phone_dict.is_ios) {
                    phone = 'ios';
                }
                if(!goods.liveprogram_id){
                    goods.liveprogram_id = "";
                }
                // location.href = 'goods.html?goods_id='+goods_id;
                if(goods.goodsstore_id){
                    location.href = 'play_' + phone + '.html?&show=goods&type=' + phone + '&program_id=' + goods.liveprogram_id + "&goodsstore_id="+goods.goodsstore_id+"&t=" + new Date().getTime();
                }else{
                    location.href = 'play_' + phone + '.html?&show=goods&type=' + phone + '&program_id=' + goods.liveprogram_id + "&goodsstore_id=0&t=" + new Date().getTime();
                }

            },
            page_back: function () {
                baseConfig.page_back();
            }
        }
    });

    html_data.sessionid = GetQueryString('sessionid');
    if (html_data.sessionid) {
        html_data.sessionid_q = "sessionid=" + html_data.sessionid;
        client_storage('sessionid', html_data.sessionid);
    }

    api.sys.query_followstore_list().then(function (data) {
        html_data.near_user_list = data.result.list;
    })




});
